<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>TweenMax</title>
    <style type="text/css">
    .grey{ width: 100px; height: 100px; border: 1px solid #DDD; }
    </style>
</head>
<body>
    <div class="grey greyA">greyA 1</div>
    <div class="grey greyA">greyA 2</div>
    <div class="grey greyA">greyA 3</div>

    <div class="grey greyB">greyB 1</div>
    <div class="grey greyB">greyB 2</div>
    <div class="grey greyB">greyB 3</div>
</body>
<script src="https://www.tweenmax.com.cn/greensock-js/minified/TweenMax.min.js"></script>
<script type="text/javascript">
//在动画结束时触发此回调函数。
TweenMax.staggerTo('.greyA', 2, {
    x: 100,
    onUpdate: function (){
        console.log(11);
    }
}, 1);

//在动画结束时触发此回调函数。
//传递给 onComplete 函数的参数数组
//定义 onComplete 函数的作用域，即函数内this的指向。
// TweenMax.staggerTo('.greyB', 2, {
//     x: 100,
//     onUpdate: function (param1, param2){
//         console.log(22, param1, param2, this);
//     },
//     onStartParams:["param 1", "param 2"],
//     onStartScope: { name1: 1, name2: 2},
// }, 1);
</script>
</html>
